<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>选择器的权重</title>
		<!-- 选择器权重越高，选中几率越大 -->
		<style>
			*{ /*权值 0 很容易被覆盖*/
				color: aqua !important;/*这个选择器不受权的控制*/
				background-color: black !important;
			}
			div{ /*权值为1*/
				color: red;
				background-color: aquamarine;
			}
			
			.d1{ /*权值为10*/
				color: blue;
				background-color: brown;
			}
			div.d1{ /*选择器权值之和   权值为10+1=11*/
				color: aqua;
				background-color: azure;
			}
			body div.d1{ /*后代选择器的权值为1，权值为1+1+10=12*/
				color: black;
				background-color: white;
			}
			#d1{ /*权值为100*/
				color: azure;
				background-color: black;
			}
			div#d1{ /*权值：101*/
				color: aqua;
			}
			div#d1:hover{ /*权值：111*/
				color: azure;
			}
			
			
		</style>
			
		
	</head>
	<body>
		<div class="d1" id="d1" style="color: azure;">Lorem ipsum dolor sit amet consectetur adipisicing elit. Magnam quidem fugit fugiat ratione odio eius temporibus sed obcaecati, voluptatem explicabo doloribus debitis exercitationem, doloremque molestias perferendis maxime eligendi. Pariatur, nisi.</div>
	</body>
</html>